package com.xaicode.auth.service;

import com.xaicode.auth.base.BaseMpService;
import com.xaicode.auth.entity.SysUser;
import com.xaicode.auth.security.domain.dto.AssignRoleDto;
import com.xaicode.auth.security.domain.dto.SysUserDto;
import com.xaicode.auth.security.domain.params.SysRoleUserQueryParam;
import com.xaicode.auth.security.domain.params.SysUserQueryParam;
import com.xaicode.auth.security.domain.query.SysUserQueryCriteria;
import com.github.pagehelper.PageInfo;

import java.util.List;

public interface ISysUserService extends BaseMpService<SysUser> {

    PageInfo<SysUser> queryPage(SysUserQueryParam query);

    List<SysUser> queryList(SysUserQueryParam query);


    List<SysUser> list(SysUserQueryCriteria criteria);

    String createUser(SysUserDto dto);

    void updateUser(SysUserDto dto);

    void assignRole(String userId, List<Integer> roleIds);

    PageInfo<SysUser> roleUserList(SysRoleUserQueryParam param);

    void cancelAuth(AssignRoleDto dto);

    void batchAssignRole(AssignRoleDto dto);

    int countByRoleIds(List<Integer> roleIds);

    long countByDeptIds(List<Integer> deptId);

    int countByPostIds(List<Integer> postIds);

}
